import pandas as pd
import numpy as np
import csv

road_file = pd.read_csv("csv_results/speeds.csv")
print(road_file)
road_value = road_file.values

_time = (road_value[:, 4] - road_value[:, 3]) / road_value[:, 5]
print(_time)
time_csv = np.stack((road_value[:, 0], _time), axis=-1)
with open("csv_results/time.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.writer(f)
    writer.writerow(["goal", "time"])
    writer.writerows(time_csv.tolist())
time_arr = pd.array(_time)
